home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
biz
/
patch
/
fixtb.lha
/
tbsizer.ASM
< prev
Wrap
Assembly Source File
|
1996-11-16
|
1KB
|
58 lines
OpenLib = -408
CloseLibrary = -414
SizeWindow = -288
ExecBase = 4
actscreen = 56
firstwin = 4
winxy = 4
winw = 8
winh = 10
move.l ExecBase,a6
lea IntName,a1
jsr OpenLib(a6)
move.l d0,intbase
move.l d0,a1 ;point to intbase
move.l actscreen(a1),a1 ;point to active screen
move.l firstwin(a1),a1 ;point to 1st window
loop1:
move.l winxy(a1),d0 ;get winxy
cmp.l tbxy,d0 ;this it?
bne loop2 ;no
move.w winh(a1),d0 ;get winh
cmp.w twenty,d0 ;this it?
beq bingo ;yes
loop2:
move.l (a1),a1 ;point to next window
move.l a1,d0
cmp.l zero,d0 ;any left?
bne loop1 ;yes
bra close
bingo:
move.l sixforty,d0 ;get desired width
sub.w winw(a1),d0 ;subtract window width
clr.l d1
move.l a1,a0
move.l intbase,a6
jsr SizeWindow(a6)
close:
move.l execbase,a6
move.l intbase,a1
jsr CloseLibrary(a6)
rts
IntName: dc.b "intuition.library",0
align
intbase dc.l 0
zero dc.l 0
sixforty dc.l 640
tbxy dc.w 0,11
twenty dc.w 20
end